package com.mdc.mansion.core.modules.restaurant.dto;

import java.util.List;

import org.apache.commons.collections.CollectionUtils;
import org.codehaus.jackson.annotate.JsonIgnore;

import com.google.common.collect.Lists;
import com.mdc.mansion.dataaccess.modules.restaurant.entity.Restaurant;
import com.mdc.mansion.dataaccess.modules.restaurant.entity.RestaurantExt;

public class RestaurantDTO extends Restaurant {
    private String language;
    private String noHead;
    private List<String> img;
    private List<RestaurantExt> imgMap;


	public String getNoHead() {
		return noHead;
	}

	public void setNoHead(String noHead) {
		this.noHead = noHead;
	}

	public List<RestaurantExt> getImgMap() {
		return imgMap;
	}

	public void setImgMap(List<RestaurantExt> imgMap) {
		this.imgMap = imgMap;
	}

	public List<String> getImg() {
        return img;
    }

    public void setImg(List<String> img) {
        this.img = img;
    }

    @JsonIgnore
    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public void addImgExt(List<RestaurantExt> restaurantExts) {
        this.img= Lists.newArrayList();
        if(CollectionUtils.isEmpty(restaurantExts)){return;}
        for(RestaurantExt restaurantExt:restaurantExts){
            this.img.add(restaurantExt.getVal());
        }
    }
    
    public void addImgExtMap(List<RestaurantExt> restaurantExts)
    {
    	this.imgMap =Lists.newArrayList();
    	 if(CollectionUtils.isEmpty(restaurantExts)){return;}
    	 for(RestaurantExt restaurantExt:restaurantExts){
    		 this.imgMap.add(restaurantExt);
    		 
         }
    	
    }

    //验证数据
    public void verfiy(){
        //TODO 等待接入多语言环境 配置
    }
}
